package o;

import android.content.res.ColorStateList;
import com.huawei.skinner.annotation.SkinAdapter;
import com.huawei.support.widget.HwSubTabViewContainer.SlidingTabStrip;
import com.huawei.support.widget.HwSubTabWidget;
import com.huawei.support.widget.HwSubTabWidget.SubTab;
import java.util.ArrayList;
import java.util.List;

public class flc {
    @SkinAdapter("hwSubTabIndicatorColor")
    public static void ˊ(HwSubTabWidget hwSubTabWidget, int i) {
        hwSubTabWidget.getSubTabContentView().setSelectedIndicatorColor(i);
    }

    @SkinAdapter("hwSubTabItemTextColor")
    public static void ˊ(HwSubTabWidget hwSubTabWidget, ColorStateList colorStateList) {
        fmt.ˏ(HwSubTabWidget.class, hwSubTabWidget, "mSubTabItemTextColors", colorStateList);
        if (hwSubTabWidget.getSubTabCount() > 0) {
            int selectedSubTabPostion = hwSubTabWidget.getSelectedSubTabPostion();
            List arrayList = new ArrayList();
            for (int i = 0; i < hwSubTabWidget.getSubTabCount(); i++) {
                arrayList.add(hwSubTabWidget.getSubTabAt(i));
            }
            hwSubTabWidget.removeAllSubTabs();
            ॱ(arrayList, hwSubTabWidget);
            if (selectedSubTabPostion != -1) {
                hwSubTabWidget.setSubTabSelected(selectedSubTabPostion);
                fmt.ˏ(SlidingTabStrip.class, hwSubTabWidget.getSubTabContentView(), "mSelectedPosition", Integer.valueOf(selectedSubTabPostion));
            }
        }
    }

    private static void ॱ(List<SubTab> list, HwSubTabWidget hwSubTabWidget) {
        for (int i = 0; i < list.size(); i++) {
            SubTab newSubTab = hwSubTabWidget.newSubTab(((SubTab) list.get(i)).getText());
            newSubTab.setSubTabListener(((SubTab) list.get(i)).getCallback());
            hwSubTabWidget.addSubTab(newSubTab, false);
        }
    }
}
